package com.victorvieux.android.web;

import android.view.View;
import android.widget.ImageButton;

import com.victorvieux.android.vlcmote.R;
import com.victorvieux.android.vlcmote.main;
import com.victorvieux.android.web.Communicate;


public class  play implements ImageButton.OnClickListener {
	public void onClick(View v) {
		ImageButton playpause = (ImageButton)v;
		Communicate c = Communicate.getInstance();
		if (!main.playing)
			playpause.setBackgroundResource(R.drawable.i_pause);
		else
			playpause.setBackgroundResource(R.drawable.i_play);
		c.send("pl_pause", main.currentId);
		main.playing = !main.playing;
	}
}
